import React, {Component} from "react";
import Cell from "./Cell";

export default class Row extends Component {
    playChess(row,col) {
        // console.log(row + "-" + col);
        this.props.playChess(row,col)
    }

    render() {
        const {rowData,row} = this.props;
        return (
            <div className="row-container">
                {
                    rowData.map((item,index)=><Cell key={index} row={row} col={index} playChess={this.playChess.bind(this)} value={item} />)
                }
            </div>
        );
    }
}